package com.fourthGroup.feign;

import com.fourthGroup.feign.fallback.OrderFeignFallback;
import com.fourthGroup.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "fa-order", fallback = OrderFeignFallback.class)
public interface OrderFeignClient {

    /**
     * 应用优惠券到订单
     */
    @PostMapping("/order/applyCoupon")
    Result<Double> applyCoupon(@RequestParam("orderId") String orderId, 
                              @RequestParam("couponId") Long couponId);
} 